package com.hospital.schedule.module.controller;


import com.hospital.common.base.Result;
import com.hospital.schedule.module.service.ITLeaveTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 请假类型表 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-09-11
 */
@RestController
//@RequestMapping("/t-leave-type")
public class TLeaveTypeController {
    @Autowired
    private ITLeaveTypeService tLeaveTypeService;
    /**
     * 查询所有请假类型
     *
     * @return 请假类型列表
     */
    @GetMapping("/findAllLeaveType")
    public Result findAllLeaveType(){
        return tLeaveTypeService.list()==null?Result.fail("查询失败"):Result.success(tLeaveTypeService.list());
    }
}
